﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<%namespace YouHP.Model%>
<%namespace YouHP.Utility%>
<html>
<head>
	<link rel="stylesheet" type="text/css" href="/support/alpha/style.css" />
	<link rel="stylesheet" href="/support/common/jquery-ui.css" type="text/css" />
	<link rel="stylesheet" href="/support/common/impromptu.css" type="text/css" />
	<script type="text/javascript"" src="/support/common/common.js"></script>
	<script type="text/javascript"" src="/support/common/jquery.js"></script>
	<script type="text/javascript"" src="/support/common/impromptu.js"></script>
	<script type="text/javascript"" src="/support/common/ui.core.js"></script>
	<script type="text/javascript"" src="/support/common/ui.datepicker.js"></script>
	<script type="text/javascript"" src="/support/common/ui.datepicker-zh-CN.js"></script>
	<style>
	    td { text-align:left } 
	    table { line-height:25px }
	</style>
</head>
<body>
    <div>{TrmData.Name} - {TrmData.GeneralName}</div>
    <input type="hidden" name="trmid" value={TrmData.Id}>
    <input type="hidden" name="tid" value={TrmHistoryData.Id}>
    <table>
        <tbody>
            <tr>
                <td class="table-box-left">开始日期</td>
                <td >
                    <input class="box-var validate-date" id="startdate" maxlength="10" size="10" name="startdate" style="vertical-align:middle;" value="{TrmHistoryData.StartDate.ToString("yyyy-MM-dd")}" />
                    <em class="helptext">格式：年-月-日(1970-03-08)</em>
                </td>
	        </tr>
             <tr>
                <td class="table-box-left">结束日期</td>
                <td >
                <%csharp%> string sEndDate = TrmHistoryData.EndDate.ToString("yyyy-MM-dd");
                           if(TrmHistoryData.EndDate.Year == DateTime.MaxValue.Year)  
                                sEndDate="";
                <%/csharp%>
                <input class="box-var validate-date" id="enddate" maxlength="10" size="10" name="enddate" style="vertical-align:middle;"
                                value="{sEndDate}"  />
                        
                            <em class="helptext">格式：年-月-日(1970-03-08)</em>
                     （不填表示正在使用）
                </td>
             </tr>
            
             <tr>
                <td class="table-box-left">剂量</td>
                <td >
                    <input type="text" name="dosage" id="dosage" value="{TrmHistoryData.DataValue}" class="inputstyle" size="6"
                        onkeyup="checkDosage({TrmData.MaxValue}, {TrmData.MinValue})" /> 
                    &nbsp;{TrmData.MeasurementUnits} 
                    &nbsp;<select name="frequency" id="Select1">
                        <option value="每{TrmData.Frequency}">{TrmData.Frequency}</option>
                    </select>
		            &nbsp;&nbsp;
        		    
		            <span id="dosageResult">
		            <%csharp%>if(TrmData.MinValue >= 0 &&  TrmData.MaxValue > 0){ <%/csharp%>
		            (正常范围介于{TrmData.MinValue}{TrmData.MeasurementUnits}/{TrmData.Frequency}和{TrmData.MaxValue}{TrmData.MeasurementUnits}/{TrmData.Frequency}之间) 
		            <%csharp%>}<%/csharp%>
		            </span>					    
	            </td>
             </tr> 
               
           
             <tr valign="top">
                 <td class="table-box-left">使用目的</td>
                 <td >
                   <select name="usepurpose" id="usepurpose">
                        <%csharp%>for(int i=0; i < Constants.TreatmentPurpose.Length; i ++) { <%/csharp%>
                            <option value="{i}"
                                <%csharp%>if(i==TrmHistoryData.UsePurpose){<%/csharp%>
                                    selected="selected"
                               <%csharp%>}<%/csharp%>        
                                >{Constants.TreatmentPurpose[i]}</option>
                        <%csharp%> } <%/csharp%>
                    </select>
                 </td>
            </tr>
            

           
          
            <tr valign="top">
                 <td class="table-box-left">停止原因</td>
                 <td >
                   <select name="stopreason" id="stopreason">
                        <%csharp%>for(int i=0; i < Constants.TreatmentStopReason.Length; i ++) { <%/csharp%>
                            <option value="{i}"
                               <%csharp%>if(i==TrmHistoryData.StopReason){<%/csharp%>
                                    selected="selected"
                               <%csharp%>}<%/csharp%>>
                                {Constants.TreatmentStopReason[i]}</option>
                        <%csharp%> } <%/csharp%>
                    </select>
                 </td>
            </tr>
           
            
            <tr>
                <td class="table-box-left"></td>
                <td > 
                    <span class="btn-min">
                        <a href="javascript:EditHistory('{TrmHistoryData.Id}')"  class="yellowbutton">提交</a>
                    </span>
                </td>
            </tr>   
        </tbody>
    </table> 
    <script type="text/javascript" src="/support/Alpha/Js/treatmenthistory/historystart.js"></script>  
</body>
</html>            
	          